<!-- 数据表格 -->
<template>
<div class="data-table-wp">
  <div class="title">{{title}}</div>
  <el-table
    :data="table.data"
    border
    style="width: 100%"
    :header-cell-style="{
      background: '#F2F2F2'
    }"
    @row-click="handleRowClick">
    <el-table-column v-for="(item, index) in table.head" :key="index"
      :prop="item.key"
      :label="item.label"
      align="center">
    </el-table-column>
  </el-table>
</div>
</template>
<script>
export default {
  name: 'data-table',
  data () {
    return {
      table: {
        head: [
          {label: '总数量', key: 'a'},
          {label: '未完成', key: 'b'},
          {label: '未确认', key: 'c'},
          {label: '已完成', key: 'd'},
        ],
        data: [
          {a: '2761', b: '2341', c:'1131', d: '3'}
        ]
      }
    }
  },
  props: {
    title: {
      default: ''
    }
  },
  mounted () {

  },
  methods: {
    handleRowClick () {
      this.$router.push('/hosp/remote-consultation/list');
    }
  }
}
</script>
<style lang="scss" scoped>
.data-table-wp {
  margin-bottom: 30px;
  .title {
    text-align: center;
    line-height: 58px;
    font-size: 18px;
    background: #E4E4E4;
  }
}
</style>